{% extends "tj3/tj3.html" %}


{% block content  %}  

{% load mptt_tags %} 


<h2>Task Structure </h2>
<form action="." method="post" enctype="multipart/form-data">
{{ select_project }}
<input type="submit" name="command" value="Select" class="button" />
</form>

{% if tasks %}

<center><a href="{{MEDIA_URL}}tmp/{{project.name}}.png"> 
<img src="{{MEDIA_URL}}tmp/{{project.name}}.png" width=800px border="5"/></a></center>

<h2>Task Tree</h2>
<ul class="root">
    {% recursetree tasks %}
        <li>
            <!--- dump node information --->
            <a href={% url task_detail node.id %}>{{ node.name }}</a>({{node.id}})

            <!--- drill down to the next level --->
            {% if not node.is_leaf_node %}
                <ul class="children">
                    {{ children }}
                </ul>
            {% endif %}
        </li>
    {% endrecursetree %}
</ul>

{% endif %}

{% endblock %}
